var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    hiddendot1: app.globalData.myhomework,
    hiddendot2: app.globalData.classgonggao,
    hiddendot3: true,
    hiddendot4: true
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;

    that.setData({
      hiddendot1: app.globalData.myhomework,
      hiddendot2: app.globalData.classgonggao,
    })

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    var that = this;

    that.setData({
      hiddendot1: app.globalData.myhomework,
      hiddendot2: app.globalData.classgonggao,
    })
  },

  clear1() {
    app.globalData.myhomework = false

  },
  clear2() {
    app.globalData.classgonggao = false

  }
})

// function getMessages(that) {
//   // console.log(that)
//   wx.request({
//     url: `https://geek-team.xin/ppt/findByCourse`,
//     method: 'POST',
//     header: {
//       'content-type': 'application/x-www-form-urlencoded'
//     },
//     data: {
//       course: that.data.courseId
//     },
//     success(res) {
//       if (res.data != []) {
//         that.setData({
//           hiddendot1: false
//         })
//         console.log(res.data)
//       }
//     },
//     fail: (e) => console.log(e)
//   })
// };


